<template>
  <!-- 扫码按钮 -->
  <image src="@/static/icon/scan-1.png" class="icon" mode="scaleToFill" @tap.stop="scanCode" />
</template>
<script lang="ts" setup>
const emit = defineEmits(['getCode'])

const scanCode = () => {
  uni.scanCode({
    success: function (res) {
      emit('getCode', res)
    },
  })
}
</script>
<style lang="scss"></style>
